package cn.labbook.bluetooth.service;

import cn.labbook.bluetooth.entity.Ammeter;
import cn.labbook.bluetooth.entity.StaticsEntity.ManufactorStatistics;
import cn.labbook.bluetooth.pojo.dto.AmmeterDTO;
import cn.labbook.bluetooth.pojo.dto.QrCodeDTO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lonzy
 * @since 2019-03-26
 */
public interface IAmmeterService extends IService<Ammeter> {

    ManufactorStatistics getStatisticsByManufactor(@Param("manufacturersId") String manufacturersId);

    ManufactorStatistics getStatisticsByDealer(@Param("dealerId") String dealerId);

    IPage<Ammeter> groupByPage(String adminId,String status , IPage<Ammeter> page);

    AmmeterDTO getAmmeter(String ammeterId);

    double getProtectPrice(Double protectPrice);

    QrCodeDTO getQrCode(String ammeterId);

    /**
     * 是否是房东
     *
     * @param managerId     房东id
     * @return              是房东
     */
    boolean isLandlord(String managerId);

    /**
     * 获取电费费率
     *
     * @param ammeterId 电表id
     * @return          费率
     */
    double getNowPrice(String ammeterId);

}
